Experiment to rebuild Diffuse using web applets.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at e4e7e07e35690ba5a05f280bde2b5bfa6cd3c721 21 lines 490 B view raw
1import type { APIRoute } from "astro"; 2import { getCollection } from "astro:content"; 3 4// API Route 5export const GET: APIRoute = ({ params, props, request }) => { 6 return new Response( 7 JSON.stringify(props.manifest), 8 ); 9}; 10 11// Generate static paths 12export async function getStaticPaths() { 13 const applets = await getCollection("applets"); 14 15 return applets.map((applet) => { 16 return { 17 params: { manifest: applet.id }, 18 props: { manifest: applet.data }, 19 }; 20 }); 21}